package Proxy

object TestCandyMachine {
  def main(args: Array[String]): Unit = {
    val mMonitor = new Monitor
    var mCandyMachine = new CandyMachine("北京-海定区", 6)
    mMonitor.addMachine(mCandyMachine)

    mCandyMachine = new CandyMachine("北京-昌平区", 4)
    mCandyMachine.insertCoin()
    mCandyMachine.turnCrank()
    mMonitor.addMachine(mCandyMachine)
    mCandyMachine = new CandyMachine("北京-朝阳区", 14)

    mMonitor.report()
  }

}
